package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 帖子收藏表(PostFavorite)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-15 10:43:24
 */
@ApiModel("帖子收藏表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PostFavorite implements Serializable {
    private static final long serialVersionUID = 307253066853871845L;
        /**
    *主键
    * 主键
    * isnull 1
    */
    @ApiModelProperty(value="主键", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String postFavoriteId;

    /**
    * 被收藏帖子id
    * isnull 0
    */        @ApiModelProperty(value="被收藏帖子id",position=2)
    private String postId;
    /**
    * 帖子标题
    * isnull 0
    */        @ApiModelProperty(value="帖子标题",position=3)
    private String postTitle;
    /**
    * 收藏者id
    * isnull 0
    */        @ApiModelProperty(value="收藏者id",position=4)
    private String userId;
    /**
    * 收藏时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="收藏时间",position=5)
    private LocalDateTime favoriteTime;
        
    public String getPostFavoriteId() {
        return postFavoriteId;
    }

    public void setPostFavoriteId(String postFavoriteId) {
        this.postFavoriteId = postFavoriteId;
    }
        
    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }
        
    public String getPostTitle() {
        return postTitle;
    }

    public void setPostTitle(String postTitle) {
        this.postTitle = postTitle;
    }
        
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
        
    public LocalDateTime getFavoriteTime() {
        return favoriteTime;
    }

    public void setFavoriteTime(LocalDateTime favoriteTime) {
        this.favoriteTime = favoriteTime;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"postFavoriteId\":" + postFavoriteId +
                                  " ,\"postId\":" + postId +
                            " ,\"postTitle\":" + postTitle +
                            " ,\"userId\":" + userId +
                            " ,\"favoriteTime\":" + favoriteTime +
                  '}';
    }


}
